<!-- 用户列表 -->
<style>
	th {
		text-align: center;
	}
	
	.table>tbody>tr>td {
		line-height: 60px;
		text-align: center;
		height: 50px;
		margin: 0px;
	}
</style>
<div id="data_page" class="in_page">
	<div class="panel panel-default">
		<div class="panel-body">
			<form class="form-inline" action="{:U('User/index')}" method="get" name="keyword" id="keyword">
				<div class="form-group">
					<select class="form-control" name="is_agent">
						<option value="">全部</option>
						<option value="0" <if condition="I('is_agent') === '0'">selected</if>>非区县代理</option>
						<option value="1" <if condition="I('is_agent') == 1">selected</if>>是区县代理</option>
					</select>
				</div>
				<div class="form-group">
					<select class="form-control" id="type" name="type">
						<option value="nickname">昵称</option>
						<option value="phone">手机号</option>
						<option value="member_no">会员号</option>
					</select>
					<input type="text" class="form-control" id="exampleInputName2" name="key" >
				</div>
				<button type="submit" class="btn btn-sm btn-default">搜索</button>
				<!--<div class="form-group">
					<button type="button" class="btn btn-sm btn-primary ">添加项目</button>
					<button type="button" class="btn btn-sm btn-primary ">列表轮播图管理</button>
				</div>-->
			</form>
		</div>
	</div>
	<table class="table table-striped table-bordered table-condensed  ">
		 <thead>
			<tr>
				<th>key</th>
				<th>头像</th>
				<th>昵称</th>
				<th>年龄</th>
				<th>性别</th>
				<th>手机</th>
				<th>会员号</th>
				<th>个性签名</th>
				<th>是否入驻</th>
				<th>登录次数</th>
				<th>状态</th>
				<th>注册时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="li">
				<tr>
					<td width="50px">{$li.key}</td>
					<td width="50px"><img width="50px" height="50px" src="{$li.img}"style="border-radius: 50%;" /></td>
					<td width="150px">{$li.nickname}</td>
					<td width="50px"><if condition="$li.age neq ''">{$li.age}<else />未知</if></td>
					<td width="50px">
						<if condition="$li.sex eq 1">男</if>
						<if condition="$li.sex eq 2">女</if>
						<if condition="$li.sex eq 0">保密</if>
					</td>
					<td width="100px">{$li.phone}</td>
					<td width="100px">{$li.member_no}</td>
					<td style=" text-align: center; overflow: hidden;"><if condition="$li.sig neq ''">{$li.sig}<else />无</if></td>
					<td style="text-align:center"width="100px">
						<if condition="$li['shopname'] eq ''">
							普通用户
						<else />
							<font color="green">已入驻</font>
						</if>
					</td>
					<td width="100px">{$li.login_num|default=0}</td>
					<td width="100px"><empty name="li['status']">拉黑<else/>正常</empty></td>
					<td width="200px" style="text-align: center;"><?php echo date('Y.m.d H:i:n',$li['ctime']); ?></td>
					<td>
						<eq name="li['is_agent']" value="1">
							<a href="{:U('Order/index', array('agent_city'=>urlencode($li['agent_city'])))}">
								<button type="button" class="btn btn-sm btn-success">销售数据</button>
							</a>
						</eq>
						<a href="{:U('edit',array('id'=>$li['id']))}">
							<button type="button" class="btn btn-sm btn-success" >修改</button>
						</a>
					</td>
				</tr>
			</volist>
		</tbody>
	</table>

</div>
<div>{$page}</div>
<!-- 添加用户 -->